﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Media;
using System.Runtime.InteropServices;
using System.Threading;

namespace Senthil.Mobile.WhereAmI
{
    public partial class SoundPlayForm : Form
    {
        public SoundPlayForm()
        {
            InitializeComponent();
        }

        private LinkLabel stopSoundLabel;
        private MainMenu mainMenu1;
        private MenuItem closeMenuItem;

        private void linkLabel1_Click(object sender, EventArgs e)
        {
            CustomSoundPlayer.StopPlaying();
        }

        private void SoundPlayForm_Closed(object sender, EventArgs e)
        {
            CustomSoundPlayer.StopPlaying();        
        }

        private void InitializeComponent()
        {
            this.stopSoundLabel = new System.Windows.Forms.LinkLabel();
            this.mainMenu1 = new System.Windows.Forms.MainMenu();
            this.closeMenuItem = new System.Windows.Forms.MenuItem();
            this.SuspendLayout();
            // 
            // stopSoundLabel
            // 
            this.stopSoundLabel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.stopSoundLabel.Font = new System.Drawing.Font("Segoe Condensed", 26F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))));
            this.stopSoundLabel.Location = new System.Drawing.Point(0, 0);
            this.stopSoundLabel.Name = "stopSoundLabel";
            this.stopSoundLabel.Size = new System.Drawing.Size(176, 180);
            this.stopSoundLabel.TabIndex = 0;
            this.stopSoundLabel.Text = "Stop";
            this.stopSoundLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
            this.stopSoundLabel.Click += new System.EventHandler(this.linkLabel1_Click);
            // 
            // mainMenu1
            // 
            this.mainMenu1.MenuItems.Add(this.closeMenuItem);
            // 
            // closeMenuItem
            // 
            this.closeMenuItem.Text = "Close";
            this.closeMenuItem.Click += new System.EventHandler(this.closeMenuItem_Click);
            // 
            // SoundPlayForm
            // 
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
            this.ClientSize = new System.Drawing.Size(176, 180);
            this.Controls.Add(this.stopSoundLabel);
            this.Menu = this.mainMenu1;
            this.Name = "SoundPlayForm";
            this.Text = "Wami - Playing Sound";
            this.Closed += new System.EventHandler(this.SoundPlayForm_Closed);
            this.ResumeLayout(false);

        }

        private void closeMenuItem_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }

        
    }
}